package com.model.demo.designmodel.observer.guava.gper;

import com.google.common.eventbus.Subscribe;

/**
 * 观察者
 */
public class Teacher  {
    private  String name;

    public Teacher(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Subscribe
    public void reciveQuesion(Question question) {
        System.out.println("*****************");
        System.out.println(question.getUserName() + "在" + GPer.getInstance().getName() + "上问：" );
        System.out.println(question.getContent());
        System.out.println(name + "老师请解答！");

    }
}
